﻿/// ---------------------------------------------
///
/// ---------------------------------------------

///---------------------------

//双击事件
function CustomDbClick() {
    parent.closeWin(); //去掉双击功能
}


//排班
var fnScheduling = function () {
    document.getElementById("EditUIWindow").src = "../EHR/hrEmpScheduling.aspx";
    SetDWH(800, 400, YAHOO.example.container.dialog1);
    YAHOO.example.container.dialog1.show();
}

//修改信息
var fnCustomEdit = function () {
    var recordID = myDataTable.getSelectedRows()[0];
    record = myDataTable.getRecord(recordID);
    if (record == null) {
        alert("请选择一条记录");
        return;
    }
    var WorkDate = record._oData["WorkDate"]
    if (WorkDate == "部门默认" || WorkDate == "岗位默认") {
        alert("默认班次不能在此修改，请到【班次设置】中修改");
        return;
    }
    //debugger;
    const_EditEntity = "wkScheduling";
    var pagetitle = "修改-" + record._oData["EmpName"] + "-" + record._oData["WorkDate"] + "-排班";

    document.getElementById("dialog1_h").innerHTML = pagetitle
    document.getElementById("EditUIWindow").src = "../Extend/AutoLoadForm.aspx?r=" + Math.random() + "&entity=" + const_EditEntity + "&id=" + record.getData(const_entityID);
    SetDWH(450, 200, YAHOO.example.container.dialog1);
    YAHOO.example.container.dialog1.show();
}


//初始化
if (typeof ($) != "undefined") {
    $(document).ready(function (){

    });
}


